package cn.example.common.protocol.structs;

import lombok.Data;
import java.util.Map;
import cn.hutool.core.map.MapUtil;
import org.artifact.core.lang.DTO;
@Data
/**
 * 任务
 */
public class TaskDTO implements DTO{
	/** 唯一标示 */
	private long id;
	/** 配置ID */
	private int cid;
	/** 进度 */
	private int schedule;
	/** 状态 */
	private int status;

	public Map<Object, Object> toMap(Map<Object, Object> map){
		map.put(3355,this.id);
		map.put(98494,this.cid);
		map.put(-697920873,this.schedule);
		map.put(-892481550,this.status);
	    return map;
	}

	public TaskDTO forMap(Map<Object, Object> map){
        this.id = MapUtil.getLong(map ,3355);
        this.cid = MapUtil.getInt(map ,98494);
        this.schedule = MapUtil.getInt(map ,-697920873);
        this.status = MapUtil.getInt(map ,-892481550);
        return this;
    }
}